<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>Grid API (WebFX)</title>
		<script type="text/javascript" src="../../webfxlayout.js"></script>
		<script type="text/javascript" src="../../webfxapi.js"></script>
		<style type="text/css">
			table { width: 500px; }
			td { vertical-align: top; }
		</style>
	</head>
	<body>
		<!-- WebFX Layout Include -->
		<script type="text/javascript">
			var articleMenu= new WebFXMenu;
			articleMenu.left  = 384;
			articleMenu.top   = 86;
			articleMenu.width = 140;
			articleMenu.add(new WebFXMenuItem("History &amp; Introduction", "intro.html"));
			articleMenu.add(new WebFXMenuItem("Usage", "usage.html"));
			articleMenu.add(new WebFXMenuItem("API", "api.html"));
			articleMenu.add(new WebFXMenuItem("Backend - Introduction", "backend.html"));
			articleMenu.add(new WebFXMenuItem("Backend - Perl (cgi/mod_perl)", "perl.html"));
			articleMenu.add(new WebFXMenuItem("Backend - C++ (cgi/isapi)", "cpp.html"));
			articleMenu.add(new WebFXMenuItem("Backend - Java (servlet)", "java.html"));
			articleMenu.add(new WebFXMenuItem("Demo", "javascript:window.open('demo.html','demo','scrollbars=yes,status=no,width=550,height=260,resizable=yes'); void(0);"));
			articleMenu.add(new WebFXMenuSeparator);
			articleMenu.add(new WebFXMenuItem("Download", "/download/grid10.zip"));
			webfxMenuBar.add(new WebFXMenuButton("Article Menu", null, null, articleMenu));
			webfxLayout.writeTitle("Grid (API)");
			webfxLayout.writeMenu();
			webfxLayout.writeDesignedByEdger();
		</script>
		<!-- end WebFX Layout Includes -->
<div class="webfx-main-body">
<!--
Generated using api.xsl version 020528
--><!-- Start main output --><h2 id="WebFXGrid">WebFXGrid</h2><p>
			This is the base class, representing the grid.
		</p><h3>Syntax</h3><pre>new WebFXGrid(aData);<br />new WebFXGrid(nRows, nCols);</pre><h3>Parameters</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>aData</code></td><td><code>String[][]</code></td><td>
					A two dimensional array containing the number of rows and columns desired.
					Unless the array is empty the values found will be used to populate the appropiate cells.
				</td></tr><tr><td><code>nRows</code></td><td><code>Number</code></td><td>Desired number of rows</td></tr><tr><td><code>nCols</code></td><td><code>Number</code></td><td>Desired number of columns</td></tr></tbody></table><h3>Static Methods</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody></tbody></table><h3>Static Fields</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="3">None.</td></tr></tbody></table><h3>Methods</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">addCol</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.addCol([<span class="methodArgument">sValue</span>])</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>sValue</code></td><td><code>String</code></td><td><span class="optional">Optional.</span> If specified this value will be used in the new cells.</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Adds a new column to the grid</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">addRow</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.addRow([<span class="methodArgument">p0</span>&nbsp;[, <span class="methodArgument">sid</span>]])</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>p0</code></td><td><code>Number[]</code></td><td><span class="optional">Optional.</span>
							Can either be a number to indicate the desired number of cells or an array
							containing data to populate the row. If not specified an emty row will be
							added with the same number of cells as the grid has.
						</td></tr><tr><td><code>sid</code></td><td><code>Number[]</code></td><td><span class="optional">Optional.</span> If specified this value will be used in the new cells.</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Adds a new column to the grid</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">calcSize</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.calcSize()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Re-Calculates the size of the grid itself and all it's sub elements</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">dump</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.dump([<span class="methodArgument">b</span>])</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>b</code></td><td><code>Boolean</code></td><td><span class="optional">Optional.</span> If true all cells will be dumped, otherwise only the modified ones will be included.<span class="defaultSentence">
					The default value is <code>false</code>.
				</span></td></tr></tbody></table><h4>Return Type</h4><p><code>String</code></p></div></div></td><td>
					Dumps the content of the grid as a long string, formatted as a query string, making it suitable
					for usage with a back-end. See the backend introduction for further information about this method.
				</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">dumpMatrix</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.dumpMatrix()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>String[][]</code></p></div></div></td><td>Deprecated - see getGridData.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">find</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.find(<span class="methodArgument">condition</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>condition</code></td><td><code>String</code></td><td>The condition to match (indexOf will be used, not very sophisticated)</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Highlights the first row containing a cell that matches the supplied condition, It's quite useless, subclass it if you need a proper search function.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">focus</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.focus()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Changes focus to the grid</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">getColSizes</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.getColSizes()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>Number[]</code></p></div></div></td><td>Returns an array containing the column sizes.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">getGridData</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.getGridData()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>String[][]</code></p></div></div></td><td>Returns the content of the grid as a two dimensional array.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">getSelected</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.getSelected()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>Element</code></p></div></div></td><td>Returns a reference to the selected rows &lt;tr&gt; element.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">getShowSid</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.getShowSid()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>Boolean</code></p></div></div></td><td>Returns the ShowSid flag, see setShowSid.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">removeRow</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.removeRow([<span class="methodArgument">row</span>])</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>row</code></td><td><code>Number</code></td><td><span class="optional">Optional.</span> Row to remove</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Removes the specified row, or if no row is specified the selected one.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">selectFirst</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.selectFirst()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Selects the first row.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">selectLast</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.selectLast()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Selects the last row.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setAutoExpand</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setAutoExpand(<span class="methodArgument">b</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>b</code></td><td><code>Boolean</code></td><td>Flag</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the autoExpand flag. If true a new row will automatically be added to the grid once the last one is modified. Default is false.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setCellStyles</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setCellStyles(<span class="methodArgument">a</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code>String[][]</code></td><td>A two dimensional array containing css strings for each cell</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Assigns an individual css string to each cell</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setCellValue</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setCellValue(<span class="methodArgument">iRow</span>, <span class="methodArgument">iCell</span>&nbsp;[, <span class="methodArgument">sValue</span>&nbsp;[, <span class="methodArgument">iIndex</span>]])</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>iRow</code></td><td><code>Number</code></td><td>The row index number</td></tr><tr><td><code>iCell</code></td><td><code>Number</code></td><td>The cell index number</td></tr><tr><td><code>sValue</code></td><td><code>String</code></td><td><span class="optional">Optional.</span> The value</td></tr><tr><td><code>iIndex</code></td><td><code>Number</code></td><td><span class="optional">Optional.</span> If the cell consists of a drop down, use this to set the value by the option index rather than id, as setting the value would.</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the value of a cell</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setColDefault</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setColDefault(<span class="methodArgument">a</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code>String[]</code></td><td>An array containing the values.</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the default values for each column</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setColFlags</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setColFlags(<span class="methodArgument">a</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code>Number[]</code></td><td>
							An array containing the flags, each flag is a bitmap according to this legend:<br />
							Bit 1 - Read only<br />Bit 2 - Mandatory<br />Bit 4 - Mask data (password field)<br />Bit 8 - Hidden
						</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the column flags, preferably used when creating the grid.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setColLengths</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setColLengths(<span class="methodArgument">a</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code>Number[]</code></td><td>An array with the lengths to use. Preferably used when creating the grid.</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the maximum allowed length for each column. (Only applies to text fields, equivalent of the maxlength property)</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setColSizes</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setColSizes(<span class="methodArgument">a</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code>String[]</code></td><td>An array with the sizes to use, append unit for non-pixel arguments. Preferably used when creating the grid.</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the column sizes</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setColTypes</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setColTypes(<span class="methodArgument">a</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code>Number[]</code></td><td>
							An array containing the types.<br />
							1 - Int<br />2 - String<br />3 - Date<br />4 - Float
						</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>
					Sets the column types, limiting and verifying the content. For example a column with the type
					int may only contain digits, while a String Column may contain anything. The column type
					will also affect the sorting functionality. Preferably used when creating the grid.
				</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setHeaders</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setHeaders(<span class="methodArgument">a</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code>String[]</code></td><td>An array with the headers to use</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the column headers, preferably used when creating the grid.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setHideBoxOnBlur</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setHideBoxOnBlur(<span class="methodArgument">b</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>b</code></td><td><code>Boolean</code></td><td>Flag</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the hideBoxOnBlur flag. If true the edit box will be hidden on blur. Default is false.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setId</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setId(<span class="methodArgument">i</span>, <span class="methodArgument">id</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>i</code></td><td><code>Number</code></td><td>Row index for the desired row</td></tr><tr><td><code>id</code></td><td><code>Number</code></td><td>The new id number</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the id for a certain row</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setLinkData</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setLinkData(<span class="methodArgument">a</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code>String[][]</code></td><td>A set of arrays containing the link data to use</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the link data (presented as a drop down menu) for each column, see the usage section for further information. Preferably used when creating the grid.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setNewIds</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setNewIds(<span class="methodArgument">a</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code>Number[]</code></td><td>An array with the ids to use</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the id for on or more rows that doesn't have any, used to assign ids to rows once they have been created. The value -1 is treated as a fag indicating that the save operation failed, thus marking the row as not saved.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setRowsServerIds</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setRowsServerIds(<span class="methodArgument">a</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code>Number[]</code></td><td>An array with the ids to use</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the id for all rows, preferably used when creating the grid.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setShowSid</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setShowSid(<span class="methodArgument">b</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>b</code></td><td><code>Boolean</code></td><td>Flag</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the ShowSid flag. If true the id column will display the row ids, if false the row numbers will be displayed, and every second row will be a slightly different color.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setSize</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setSize(<span class="methodArgument">w</span>, <span class="methodArgument">h</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>w</code></td><td><code>Number</code></td><td>The desired with</td></tr><tr><td><code>h</code></td><td><code>Number</code></td><td>The desired height</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Resize the grid using the supplied parameters, will automatically invoke the calcSize method afterwards.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setUri</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setUri(<span class="methodArgument">s</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>s</code></td><td><code>String</code></td><td>Any valid uri</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets the URI that will be used as a base for the dump method, the dump data will be appended to whatever this is set to. See the backend introduction for further information.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">sort</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.sort(<span class="methodArgument">col</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>col</code></td><td><code>Number</code></td><td>Column index to sort by.</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sorts the grid by one of the columns.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">toString</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.toString()</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td></td></tr></tbody></table><h4>Return Type</h4><p><code>String</code></p></div></div></td><td>This is the method that generates the actual HTML code for the grid.</td></tr></tbody></table><h3>Fields</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>autoExpand</code></td><td><code>Boolean</code></td><td>If true a new row will automatically be added to the grid once the last one is modified. Default is false.</td></tr><tr><td><code>colDefault</code></td><td><code>String[]</code></td><td><span class="readOnly">Read only.</span> An array containing the column defaults, use setColDefault to modify.</td></tr><tr><td><code>colFlags</code></td><td><code>Number[]</code></td><td><span class="readOnly">Read only.</span> An array containing the column flags, use setColFlags to modify.</td></tr><tr><td><code>colLengths</code></td><td><code>Number[]</code></td><td><span class="readOnly">Read only.</span> An array containing the column lengths, use setColLengths to modify.</td></tr><tr><td><code>colLinkData</code></td><td><code>String[]</code></td><td><span class="readOnly">Read only.</span> An array containing the column link data, use setLinkData to modify.</td></tr><tr><td><code>cols</code></td><td><code>Number</code></td><td><span class="readOnly">Read only.</span> The number of columns in the grid.</td></tr><tr><td><code>colSizes</code></td><td><code>Number[]</code></td><td><span class="readOnly">Read only.</span> An array containing the column sizes, use setColSizes to modify.</td></tr><tr><td><code>colTypes</code></td><td><code>Number[]</code></td><td><span class="readOnly">Read only.</span> An array containing the column types, use setColTypes to modify.</td></tr><tr><td><code>defColSize</code></td><td><code>Number</code></td><td>The default column size.</td></tr><tr><td><code>flags</code></td><td><code>Number</code></td><td>Permission flags, affecting the entire grid according to this bitmap: 1 - update, 2 - insert, 4 - delete - The default value is 7.</td></tr><tr><td><code>groupByFirst</code></td><td><code>Boolean</code></td><td>Deprecated. If set to true the rows will be grouped by the first column, collapsing the cells with matching values. - This field is deprecated and will be removed in a future version, however no replacement yet implemented.</td></tr><tr><td><code>headers</code></td><td><code>String[]</code></td><td><span class="readOnly">Read only.</span> An array containing the column headers, use setHeaders to modify.</td></tr><tr><td><code>hideBoxOnBlur</code></td><td><code>Boolean</code></td><td>If true the edit box will be hidden on blur. Default is false.</td></tr><tr><td><code>minimal</code></td><td><code>Number</code></td><td>The minimal with of a cell in edit mode, if the width of the column is less than this value, the editbox will span additional columns until this value has been reached.</td></tr><tr><td><code>resizeArea</code></td><td><code>Number</code></td><td>The width of the area between columns in the grid header that can be grabbed, and used to resize the columns. Default value is 7.</td></tr><tr><td><code>resizeAreaV</code></td><td><code>Number</code></td><td>Same as resizeArea however this indicates the size of the area in which the cursor will change to indicate resizable rather than the actual area. Default value is 5.</td></tr><tr><td><code>rows</code></td><td><code>WebFXGridRow[]</code></td><td><span class="readOnly">Read only.</span> An array containing the rows of the grid.</td></tr></tbody></table><h3>Events</h3><table><thead><tr><td>Name</td><td>Descripton</td></tr></thead><tbody><tr><td><code>onChange</code></td><td>Fires when a change has been made.</td></tr><tr><td><code>onColResize</code></td><td>Fires when a column has been resized.</td></tr><tr><td><code>onNewRow</code></td><td>Fires when a new row has been added.</td></tr><tr><td><code>onSelect</code></td><td>Fires when a row has been selected.</td></tr><tr><td><code>onSort</code></td><td>Fires when the grid is sorted.</td></tr></tbody></table><h3>Remarks</h3><p>
			None.
		</p><h2 id="WebFXGridRow">WebFXGridRow</h2><p>
			This class represents a row.
		</p><h3>Syntax</h3><pre>new WebFXGridRow(aData[, sid[, bUnescapeData]]);<br />new WebFXGridRow([nCols[, sid[, bUnescapeData]]]);</pre><h3>Parameters</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>aData</code></td><td><code>String[]</code></td><td>
					An array containing the same number of elements as the row should have columns.
					Unless the array is empty the values found will be used to populate the appropiate cells.
				</td></tr><tr><td><code>nCols</code></td><td><code>Number</code></td><td>Desired number of columns</td></tr><tr><td><code>sid</code></td><td><code>Number</code></td><td>The row sid, or server id.</td></tr><tr><td><code>bUnescapeData</code></td><td><code>Boolean</code></td><td>
					If true the supplied data will be parsed through the unescape function before
					used to populate the cells. Default is false."
				</td></tr></tbody></table><h3>Static Methods</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody></tbody></table><h3>Static Fields</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="3">None.</td></tr></tbody></table><h3>Methods</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">deselect</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.deselect([<span class="methodArgument">b</span>])</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>b</code></td><td><code>Boolean</code></td><td><span class="optional">Optional.</span> If specified the row will not be blured if any of its cells are in edit mode.</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Restores the original style of the row.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">out</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.out()</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td></td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Disables the mouse over effect. Automatically executed on mouse out.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">over</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.over()</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td></td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Enables a mouse over effect that highlights the row. Automatically executed on mouse over.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">select</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.select()</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td></td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Selects the row and updates the style of it to indicate that it has been selected. Also executes the deselect method on the previously selected row and fires the onSelect event.</td></tr></tbody></table><h3>Fields</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>cells</code></td><td><code>WebFXGridCells[]</code></td><td><span class="readOnly">Read only.</span> An array containing the cells the row consists of.</td></tr><tr><td><code>id</code></td><td><code>String</code></td><td><span class="readOnly">Read only.</span> A unique name used to identify the html element that will be generated.</td></tr><tr><td><code>parent</code></td><td><code>WebFXGrid</code></td><td><span class="readOnly">Read only.</span> A reference to the parent grid.</td></tr><tr><td><code>sid</code></td><td><code>Number</code></td><td>The sid, or server id.</td></tr></tbody></table><h3>Events</h3><table><thead><tr><td>Name</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="2">None.</td></tr></tbody></table><h3>Remarks</h3><p>
			None.
		</p><h2 id="WebFXGridCell">WebFXGridCell</h2><p>
			This class represents a cell.
		</p><h3>Syntax</h3><pre>new WebFXGridCell([sValue]);</pre><h3>Parameters</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>sValue</code></td><td><code>String</code></td><td>The cell value</td></tr></tbody></table><h3>Static Methods</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody></tbody></table><h3>Static Fields</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="3">None.</td></tr></tbody></table><h3>Methods</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">click</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.click()</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td></td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Enables edit mode for the cell. This method is executed when a cell is clicked on, hence the name.</td></tr></tbody></table><h3>Fields</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>id</code></td><td><code>String</code></td><td><span class="readOnly">Read only.</span> A unique name used to identify the html element that will be generated.</td></tr><tr><td><code>index</code></td><td><code>Number</code></td><td><span class="readOnly">Read only.</span> The cell index.</td></tr><tr><td><code>parent</code></td><td><code>String</code></td><td><span class="readOnly">Read only.</span> A reference to the parent row.</td></tr><tr><td><code>style</code></td><td><code>String</code></td><td>A css string describing the style of the cell.</td></tr><tr><td><code>value</code></td><td><code>String</code></td><td><span class="readOnly">Read only.</span> The cell value. To modify use the WebFXGrid setCellValue method.</td></tr></tbody></table><h3>Events</h3><table><thead><tr><td>Name</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="2">None.</td></tr></tbody></table><h3>Remarks</h3><p>
			None.
		</p><!-- end main output -->

		</p>
		<p>
				<a href="intro.html">History & Introduction</a><br />
				<a href="usage.html">Usage</a><br />
				<b>API</b><br />
				<a href="backend.html">Backend - Introduction</a><br />
				Backend - Perl (cgi/mod_perl)<br />
				Backend - C++ (cgi/isapi)<br />
				Backend - Java (servlet)<br />
				<a href="javascript:window.open('demo.html','demo','scrollbars=yes,status=no,width=550,height=260,resizable=yes'); void(0);">Demo</a><br />
				<a href="/download/grid10.zip">Download</a>
			</p>
			<p class="author">Author: Emil A Eklund</p>
			<!-- end webfx-main-body -->
		</div>
	</body>
</html>
